
import Head from 'next/head'

<Head>
  <script>
    {
      `(function() {
         var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?e60fb290e204e04c5cb6f79b0ac1e697";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
       })();`
    }
  </script>
</Head>

![LangChain](https://pica.zhimg.com/50/v2-56e8bbb52aa271012541c1fe1ceb11a2_r.gif)



Telegram
===


> [Telegram Messenger](https://web.telegram.org/a/) 是一种全球可访问的免费增值、跨平台、加密、基于云的集中式即时消息服务。该应用程序还提供可选的端到端加密聊天和视频通话、VoIP、文件共享和其他一些功能。


This notebook covers how to load data from `Telegram` into a format that can be ingested into LangChain.

```python
from langchain.document_loaders import TelegramChatLoader

```

```python
loader = TelegramChatLoader("example_data/telegram.json")

```

```python
loader.load()

```

```python
[Document(page_content="Henry on 2020-01-01T00:00:02: It's 2020...  Henry on 2020-01-01T00:00:04: Fireworks!  Grace ðŸ§¤ ðŸ\x8d’ on 2020-01-01T00:00:05: You're a minute late!  ", lookup_str='', metadata={'source': 'example_data/telegram.json'}, lookup_index=0)]

```

